

<!DOCTYPE html>
<html lang="zh-CN" data-default-color-scheme=auto>



<head>
  <meta charset="UTF-8">
  <link rel="apple-touch-icon" sizes="76x76" href="/img/fluid.png">
  <link rel="icon" href="/img/fluid.png">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, shrink-to-fit=no">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  
  <meta name="theme-color" content="#2f4154">
  <meta name="author" content="John Doe">
  <meta name="keywords" content="">
  
    <meta name="description" content="运行环境  python3.9 pycharm  1. 安装 WordCloud模块 12pip3 install wordcloudpip3 install jieba  2. 生成词云 2.1 根据字典生成词云字典的键表示当前的词汇， 值表示当前词汇出现的次数.py 1234567891011from wordcloud import WordClouddata&#x3D; dict(((&amp;#x27;你">
<meta property="og:type" content="article">
<meta property="og:title" content="Python _ 中英文分词jieba模块 _ 词云wordcloud模块 _ 应用Demo">
<meta property="og:url" content="http://example.com/2021/12/27/Python%20_%20%E4%B8%AD%E8%8B%B1%E6%96%87%E5%88%86%E8%AF%8Djieba%E6%A8%A1%E5%9D%97%20_%20%E8%AF%8D%E4%BA%91wordcloud%E6%A8%A1%E5%9D%97%20_%20%E5%BA%94%E7%94%A8Demo/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="运行环境  python3.9 pycharm  1. 安装 WordCloud模块 12pip3 install wordcloudpip3 install jieba  2. 生成词云 2.1 根据字典生成词云字典的键表示当前的词汇， 值表示当前词汇出现的次数.py 1234567891011from wordcloud import WordClouddata&#x3D; dict(((&amp;#x27;你">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://img-blog.csdnimg.cn/9331434725384b3594f0c0e5c0a60dee.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/ea8647b375ff44daa8c646782f1662cb.png#pic_center">
<meta property="og:image" content="https://img-blog.csdnimg.cn/5ebeb6bbb89140539b757ebdd1b3c05b.png#pic_center">
<meta property="article:published_time" content="2021-12-27T11:37:48.000Z">
<meta property="article:modified_time" content="2022-08-22T15:47:24.555Z">
<meta property="article:author" content="John Doe">
<meta property="article:tag" content="Python">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:image" content="https://img-blog.csdnimg.cn/9331434725384b3594f0c0e5c0a60dee.png#pic_center">
  
  
  
  <title>Python _ 中英文分词jieba模块 _ 词云wordcloud模块 _ 应用Demo - Hexo</title>

  <link  rel="stylesheet" href="https://lib.baomitu.com/twitter-bootstrap/4.6.1/css/bootstrap.min.css" />



  <link  rel="stylesheet" href="https://lib.baomitu.com/github-markdown-css/4.0.0/github-markdown.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/hint.css/2.7.0/hint.min.css" />

  <link  rel="stylesheet" href="https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.css" />



<!-- 主题依赖的图标库，不要自行修改 -->
<!-- Do not modify the link that theme dependent icons -->

<link rel="stylesheet" href="//at.alicdn.com/t/font_1749284_hj8rtnfg7um.css">



<link rel="stylesheet" href="//at.alicdn.com/t/font_1736178_lbnruvf0jn.css">


<link  rel="stylesheet" href="/css/main.css" />


  <link id="highlight-css" rel="stylesheet" href="/css/highlight.css" />
  
    <link id="highlight-css-dark" rel="stylesheet" href="/css/highlight-dark.css" />
  




  <script id="fluid-configs">
    var Fluid = window.Fluid || {};
    Fluid.ctx = Object.assign({}, Fluid.ctx)
    var CONFIG = {"hostname":"example.com","root":"/","version":"1.9.2","typing":{"enable":true,"typeSpeed":70,"cursorChar":"_","loop":false,"scope":[]},"anchorjs":{"enable":true,"element":"h1,h2,h3,h4,h5,h6","placement":"left","visible":"hover","icon":""},"progressbar":{"enable":true,"height_px":3,"color":"#29d","options":{"showSpinner":false,"trickleSpeed":100}},"code_language":{"enable":true,"default":"TEXT"},"copy_btn":true,"image_caption":{"enable":true},"image_zoom":{"enable":true,"img_url_replace":["",""]},"toc":{"enable":true,"placement":"right","headingSelector":"h1,h2,h3,h4,h5,h6","collapseDepth":0},"lazyload":{"enable":true,"loading_img":"/img/loading.gif","onlypost":false,"offset_factor":2},"web_analytics":{"enable":false,"follow_dnt":true,"baidu":null,"google":null,"gtag":null,"tencent":{"sid":null,"cid":null},"woyaola":null,"cnzz":null,"leancloud":{"app_id":null,"app_key":null,"server_url":null,"path":"window.location.pathname","ignore_local":false}},"search_path":"/local-search.xml"};

    if (CONFIG.web_analytics.follow_dnt) {
      var dntVal = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
      Fluid.ctx.dnt = dntVal && (dntVal.startsWith('1') || dntVal.startsWith('yes') || dntVal.startsWith('on'));
    }
  </script>
  <script  src="/js/utils.js" ></script>
  <script  src="/js/color-schema.js" ></script>
  


  
<meta name="generator" content="Hexo 6.2.0"></head>


<body>
  

  <header>
    

<div class="header-inner" style="height: 70vh;">
  <nav id="navbar" class="navbar fixed-top  navbar-expand-lg navbar-dark scrolling-navbar">
  <div class="container">
    <a class="navbar-brand" href="/">
      <strong>尤 Ni&#39;s Blog</strong>
    </a>

    <button id="navbar-toggler-btn" class="navbar-toggler" type="button" data-toggle="collapse"
            data-target="#navbarSupportedContent"
            aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
      <div class="animated-icon"><span></span><span></span><span></span></div>
    </button>

    <!-- Collapsible content -->
    <div class="collapse navbar-collapse" id="navbarSupportedContent">
      <ul class="navbar-nav ml-auto text-center">
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/">
                <i class="iconfont icon-home-fill"></i>
                首页
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/archives/">
                <i class="iconfont icon-archive-fill"></i>
                归档
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/categories/">
                <i class="iconfont icon-category-fill"></i>
                分类
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/tags/">
                <i class="iconfont icon-tags-fill"></i>
                标签
              </a>
            </li>
          
        
          
          
          
          
            <li class="nav-item">
              <a class="nav-link" href="/about/">
                <i class="iconfont icon-user-fill"></i>
                关于
              </a>
            </li>
          
        
        
          <li class="nav-item" id="search-btn">
            <a class="nav-link" target="_self" href="javascript:;" data-toggle="modal" data-target="#modalSearch" aria-label="Search">
              &nbsp;<i class="iconfont icon-search"></i>&nbsp;
            </a>
          </li>
          
        
        
          <li class="nav-item" id="color-toggle-btn">
            <a class="nav-link" target="_self" href="javascript:;" aria-label="Color Toggle">&nbsp;<i
                class="iconfont icon-dark" id="color-toggle-icon"></i>&nbsp;</a>
          </li>
        
      </ul>
    </div>
  </div>
</nav>

  

<div id="banner" class="banner" parallax=true
     style="background: url('/img/default.png') no-repeat center center; background-size: cover;">
  <div class="full-bg-img">
    <div class="mask flex-center" style="background-color: rgba(0, 0, 0, 0.3)">
      <div class="banner-text text-center fade-in-up">
        <div class="h2">
          
            <span id="subtitle" data-typed-text="Python _ 中英文分词jieba模块 _ 词云wordcloud模块 _ 应用Demo"></span>
          
        </div>

        
          
  <div class="mt-3">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-author" aria-hidden="true"></i>
        John Doe
      </span>
    
    
      <span class="post-meta">
        <i class="iconfont icon-date-fill" aria-hidden="true"></i>
        <time datetime="2021-12-27 19:37" pubdate>
          2021年12月27日 晚上
        </time>
      </span>
    
  </div>

  <div class="mt-1">
    
      <span class="post-meta mr-2">
        <i class="iconfont icon-chart"></i>
        
          986 字
        
      </span>
    

    
      <span class="post-meta mr-2">
        <i class="iconfont icon-clock-fill"></i>
        
        
        
          9 分钟
        
      </span>
    

    
    
  </div>


        
      </div>

      
    </div>
  </div>
</div>

</div>

  </header>

  <main>
    
      

<div class="container-fluid nopadding-x">
  <div class="row nomargin-x">
    <div class="side-col d-none d-lg-block col-lg-2">
      

    </div>

    <div class="col-lg-8 nopadding-x-md">
      <div class="container nopadding-x-md" id="board-ctn">
        <div id="board">
          <article class="post-content mx-auto">
            <!-- SEO header -->
            <h1 style="display: none">Python _ 中英文分词jieba模块 _ 词云wordcloud模块 _ 应用Demo</h1>
            
              <p class="note note-info">
                
                  
                    本文最后更新于：1 小时前
                  
                
              </p>
            
            
              <div class="markdown-body">
                
                <h1 id="运行环境"><a href="#运行环境" class="headerlink" title="运行环境"></a>运行环境</h1><hr>
<ul>
<li>python3.9</li>
<li>pycharm</li>
</ul>
<h1 id="1-安装-WordCloud模块"><a href="#1-安装-WordCloud模块" class="headerlink" title="1. 安装 WordCloud模块"></a>1. 安装 WordCloud模块</h1><hr>
<figure class="highlight shell"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs shell">pip3 install wordcloud<br>pip3 install jieba<br></code></pre></td></tr></table></figure>

<h1 id="2-生成词云"><a href="#2-生成词云" class="headerlink" title="2. 生成词云"></a>2. 生成词云</h1><hr>
<h2 id="2-1-根据字典生成词云"><a href="#2-1-根据字典生成词云" class="headerlink" title="2.1 根据字典生成词云"></a>2.1 根据字典生成词云</h2><p>字典的键表示当前的词汇， 值表示当前词汇出现的次数<br><code>.py</code></p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><code class="hljs python"><span class="hljs-keyword">from</span> wordcloud <span class="hljs-keyword">import</span> WordCloud<br>data= <span class="hljs-built_in">dict</span>(((<span class="hljs-string">&#x27;你好&#x27;</span>, <span class="hljs-number">2</span>), (<span class="hljs-string">&#x27;什么&#x27;</span>, <span class="hljs-number">5</span>), (<span class="hljs-string">&#x27;没事&#x27;</span>, <span class="hljs-number">1</span>), (<span class="hljs-string">&#x27;喜欢&#x27;</span>, <span class="hljs-number">7</span>), (<span class="hljs-string">&#x27;睡觉&#x27;</span>, <span class="hljs-number">3</span>)))<br>t = WordCloud(<br>    font_path=<span class="hljs-string">r&#x27;c:\windows\fonts\simfang.ttf&#x27;</span>,<br>    width=<span class="hljs-number">600</span>, height=<span class="hljs-number">480</span>,  <span class="hljs-comment"># 图片大小</span><br>    background_color=<span class="hljs-string">&#x27;white&#x27;</span>,  <span class="hljs-comment"># 背景颜色</span><br>    font_step=<span class="hljs-number">5</span>,  <span class="hljs-comment"># 字体间隔</span><br>    <span class="hljs-comment">#mask=pic,  # 背景图模板   pic 可以是plt.imread(图片地址) 返回的对象</span><br>    scale=<span class="hljs-number">10</span>,  <span class="hljs-comment"># 清晰程度 值越大越清晰</span><br>              ).generate_from_frequencies(data)<br>t.to_image().show()<br></code></pre></td></tr></table></figure>

<p><code> 运行结果</code></p>
<p><img src="https://img-blog.csdnimg.cn/9331434725384b3594f0c0e5c0a60dee.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<h2 id="2-2-根据文本生成词云-使用jieba分词"><a href="#2-2-根据文本生成词云-使用jieba分词" class="headerlink" title="2.2 根据文本生成词云 使用jieba分词"></a>2.2 根据文本生成词云 使用jieba分词</h2><p>以下面的文本（网络上的一篇论文）为例<br><img src="https://img-blog.csdnimg.cn/ea8647b375ff44daa8c646782f1662cb.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>
<p><code>.py</code></p>
<figure class="highlight python"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><code class="hljs python"><span class="hljs-keyword">from</span> wordcloud <span class="hljs-keyword">import</span> WordCloud<br><span class="hljs-keyword">import</span> jieba<br><br><span class="hljs-keyword">with</span> <span class="hljs-built_in">open</span>(<span class="hljs-string">&#x27;C:\\Users\\Lenovo\\Desktop\\文本内容.txt&#x27;</span>, <span class="hljs-string">&#x27;r&#x27;</span>,  encoding=<span class="hljs-string">&#x27;UTF-8&#x27;</span>) <span class="hljs-keyword">as</span> fp:<br>    <span class="hljs-comment"># 过滤</span><br>    no = [<span class="hljs-string">&#x27;的&#x27;</span>, <span class="hljs-string">&#x27;和&#x27;</span>, <span class="hljs-string">&#x27;为&#x27;</span>]<br>    data_origin = [ x <span class="hljs-keyword">for</span> x <span class="hljs-keyword">in</span> jieba.cut(fp.read())<br>                                <span class="hljs-keyword">if</span> x <span class="hljs-keyword">not</span> <span class="hljs-keyword">in</span> no]<br>    <span class="hljs-comment">#以空格方式合并字符串</span><br>    data = <span class="hljs-string">&quot; &quot;</span>.join(data_origin)<br>    <span class="hljs-comment">#生成词云</span><br>    t = WordCloud(font_path=<span class="hljs-string">r&#x27;c:\windows\fonts\simfang.ttf&#x27;</span> ).generate(data)<br>    t.to_image().show()<br></code></pre></td></tr></table></figure>
<p>执行结果:<br><img src="https://img-blog.csdnimg.cn/5ebeb6bbb89140539b757ebdd1b3c05b.png#pic_center" srcset="/img/loading.gif" lazyload alt="在这里插入图片描述"></p>

                
              </div>
            
            <hr/>
            <div>
              <div class="post-metas my-3">
  
    <div class="post-meta mr-3 d-flex align-items-center">
      <i class="iconfont icon-category"></i>
      

<span class="category-chains">
  
  
    
      <span class="category-chain">
        
  <a href="/categories/Python/" class="category-chain-item">Python</a>
  
  

      </span>
    
  
</span>

    </div>
  
  
    <div class="post-meta">
      <i class="iconfont icon-tags"></i>
      
        <a href="/tags/Python/">#Python</a>
      
    </div>
  
</div>


              
  

  <div class="license-box my-3">
    <div class="license-title">
      <div>Python _ 中英文分词jieba模块 _ 词云wordcloud模块 _ 应用Demo</div>
      <div>http://example.com/2021/12/27/Python _ 中英文分词jieba模块 _ 词云wordcloud模块 _ 应用Demo/</div>
    </div>
    <div class="license-meta">
      
        <div class="license-meta-item">
          <div>作者</div>
          <div>John Doe</div>
        </div>
      
      
        <div class="license-meta-item license-meta-date">
          <div>发布于</div>
          <div>2021年12月27日</div>
        </div>
      
      
      <div class="license-meta-item">
        <div>许可协议</div>
        <div>
          
            
            
              <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">
              <span class="hint--top hint--rounded" aria-label="BY - 署名">
                <i class="iconfont icon-by"></i>
              </span>
              </a>
            
          
        </div>
      </div>
    </div>
    <div class="license-icon iconfont"></div>
  </div>



              
                <div class="post-prevnext my-3">
                  <article class="post-prev col-6">
                    
                    
                      <a href="/2021/12/30/JavaWeb%20_%20JDBC%20_%20%E8%BF%90%E7%94%A8%E5%8F%8D%E5%B0%84%E5%92%8C%E6%B3%9B%E5%9E%8B%E6%9C%BA%E5%88%B6%E5%AE%9E%E7%8E%B0%E6%9F%A5%E8%AF%A2%E6%95%B0%E6%8D%AE%E8%A1%A8%E5%90%8E%E7%9B%B4%E6%8E%A5%E5%88%9B%E5%BB%BA%E6%8C%87%E5%AE%9A%E7%9A%84%E5%AF%B9%E8%B1%A1/" title="JavaWeb _ JDBC _ 运用反射和泛型机制实现查询数据表后直接创建指定的对象">
                        <i class="iconfont icon-arrowleft"></i>
                        <span class="hidden-mobile">JavaWeb _ JDBC _ 运用反射和泛型机制实现查询数据表后直接创建指定的对象</span>
                        <span class="visible-mobile">上一篇</span>
                      </a>
                    
                  </article>
                  <article class="post-next col-6">
                    
                    
                      <a href="/2021/12/25/Web%E9%A1%B9%E7%9B%AE%E5%AE%9E%E6%88%98%20_%20%E8%B4%AD%E7%89%A9%E7%B3%BB%E7%BB%9Fv1.0%20_%20%E5%BC%80%E5%8F%91%E8%AE%B0%E5%BD%95%EF%BC%88%E5%85%AD%EF%BC%89_%E4%BD%BF%E7%94%A8coockie%E5%AE%9E%E7%8E%B0%E8%AE%B0%E4%BD%8F%E5%AF%86%E7%A0%81%20_%20%E9%9D%9E%E7%99%BB%E9%99%86%E7%94%A8%E6%88%B7%E6%8B%A6%E6%88%AA%20_%20AJAX%E6%96%87%E5%AD%97%E7%99%BB%E9%99%86%E9%AA%8C%E8%AF%81%20_%20%E4%BD%BF%E7%94%A8Bootstrap5%E6%A1%86%E6%9E%B6%E7%9A%84%E6%A8%A1%E6%80%81%E6%A1%86%E7%BB%84%E4%BB%B6%E6%98%BE%E7%A4%BA%E6%8F%90%E7%A4%BA%E5%BC%B9%E7%AA%97/" title="Web项目实战 _ 购物系统v1.0 _ 开发记录（六）_使用coockie实现记住密码 _ 非登陆用户拦截 _ AJAX文字登陆验证 _ 使用Bootstrap5框架的模态框组件显示提示弹窗">
                        <span class="hidden-mobile">Web项目实战 _ 购物系统v1.0 _ 开发记录（六）_使用coockie实现记住密码 _ 非登陆用户拦截 _ AJAX文字登陆验证 _ 使用Bootstrap5框架的模态框组件显示提示弹窗</span>
                        <span class="visible-mobile">下一篇</span>
                        <i class="iconfont icon-arrowright"></i>
                      </a>
                    
                  </article>
                </div>
              
            </div>

            
          </article>
        </div>
      </div>
    </div>

    <div class="side-col d-none d-lg-block col-lg-2">
      
  <aside class="sidebar" style="margin-left: -1rem">
    <div id="toc">
  <p class="toc-header"><i class="iconfont icon-list"></i>&nbsp;目录</p>
  <div class="toc-body" id="toc-body"></div>
</div>



  </aside>


    </div>
  </div>
</div>





  



  



  



  



  







    

    
      <a id="scroll-top-button" aria-label="TOP" href="#" role="button">
        <i class="iconfont icon-arrowup" aria-hidden="true"></i>
      </a>
    

    
      <div class="modal fade" id="modalSearch" tabindex="-1" role="dialog" aria-labelledby="ModalLabel"
     aria-hidden="true">
  <div class="modal-dialog modal-dialog-scrollable modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header text-center">
        <h4 class="modal-title w-100 font-weight-bold">搜索</h4>
        <button type="button" id="local-search-close" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body mx-3">
        <div class="md-form mb-5">
          <input type="text" id="local-search-input" class="form-control validate">
          <label data-error="x" data-success="v" for="local-search-input">关键词</label>
        </div>
        <div class="list-group" id="local-search-result"></div>
      </div>
    </div>
  </div>
</div>

    

    
  </main>

  <footer>
    <div class="footer-inner">
  
    <div class="footer-content">
       <a href="https://hexo.io" target="_blank" rel="nofollow noopener"><span>Hexo</span></a> <i class="iconfont icon-love"></i> <a href="https://github.com/fluid-dev/hexo-theme-fluid" target="_blank" rel="nofollow noopener"><span>Fluid</span></a> 
    </div>
  
  
  
  
</div>

  </footer>

  <!-- Scripts -->
  
  <script  src="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.js" ></script>
  <link  rel="stylesheet" href="https://lib.baomitu.com/nprogress/0.2.0/nprogress.min.css" />

  <script>
    NProgress.configure({"showSpinner":false,"trickleSpeed":100})
    NProgress.start()
    window.addEventListener('load', function() {
      NProgress.done();
    })
  </script>


<script  src="https://lib.baomitu.com/jquery/3.6.0/jquery.min.js" ></script>
<script  src="https://lib.baomitu.com/twitter-bootstrap/4.6.1/js/bootstrap.min.js" ></script>
<script  src="/js/events.js" ></script>
<script  src="/js/plugins.js" ></script>


  <script  src="https://lib.baomitu.com/typed.js/2.0.12/typed.min.js" ></script>
  <script>
    (function (window, document) {
      var typing = Fluid.plugins.typing;
      var subtitle = document.getElementById('subtitle');
      if (!subtitle || !typing) {
        return;
      }
      var text = subtitle.getAttribute('data-typed-text');
      
        typing(text);
      
    })(window, document);
  </script>




  
    <script  src="/js/img-lazyload.js" ></script>
  




  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/tocbot/4.18.2/tocbot.min.js', function() {
    var toc = jQuery('#toc');
    if (toc.length === 0 || !window.tocbot) { return; }
    var boardCtn = jQuery('#board-ctn');
    var boardTop = boardCtn.offset().top;

    window.tocbot.init({
      tocSelector     : '#toc-body',
      contentSelector : '.markdown-body',
      headingSelector : CONFIG.toc.headingSelector || 'h1,h2,h3,h4,h5,h6',
      linkClass       : 'tocbot-link',
      activeLinkClass : 'tocbot-active-link',
      listClass       : 'tocbot-list',
      isCollapsedClass: 'tocbot-is-collapsed',
      collapsibleClass: 'tocbot-is-collapsible',
      collapseDepth   : CONFIG.toc.collapseDepth || 0,
      scrollSmooth    : true,
      headingsOffset  : -boardTop
    });
    if (toc.find('.toc-list-item').length > 0) {
      toc.css('visibility', 'visible');
    }
  });
</script>


  <script src=https://lib.baomitu.com/clipboard.js/2.0.10/clipboard.min.js></script>

  <script>Fluid.plugins.codeWidget();</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/anchor-js/4.3.1/anchor.min.js', function() {
    window.anchors.options = {
      placement: CONFIG.anchorjs.placement,
      visible  : CONFIG.anchorjs.visible
    };
    if (CONFIG.anchorjs.icon) {
      window.anchors.options.icon = CONFIG.anchorjs.icon;
    }
    var el = (CONFIG.anchorjs.element || 'h1,h2,h3,h4,h5,h6').split(',');
    var res = [];
    for (var item of el) {
      res.push('.markdown-body > ' + item.trim());
    }
    if (CONFIG.anchorjs.placement === 'left') {
      window.anchors.options.class = 'anchorjs-link-left';
    }
    window.anchors.add(res.join(', '));
  });
</script>


  
<script>
  Fluid.utils.createScript('https://lib.baomitu.com/fancybox/3.5.7/jquery.fancybox.min.js', function() {
    Fluid.plugins.fancyBox();
  });
</script>


  <script>Fluid.plugins.imageCaption();</script>

  <script  src="/js/local-search.js" ></script>





<!-- 主题的启动项，将它保持在最底部 -->
<!-- the boot of the theme, keep it at the bottom -->
<script  src="/js/boot.js" ></script>


  

  <noscript>
    <div class="noscript-warning">博客在允许 JavaScript 运行的环境下浏览效果更佳</div>
  </noscript>
</body>
</html>
